home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir41 / x10xa200.zip / XMAS.CMD < prev   
OS/2 REXX Batch file  |  1993-10-16  |  2KB  |  90 lines

  1. #============================================================================
  2. #
  3. #       GOTO/GOSUB Demo Program for XA 
  4. #
  5. #       This command file produces lighting effects for a Christmas display.
  6. #       Four modules are used, you can add more if desired. 
  7. #
  8.  
  9. # Names for XMAS_RED, XMAS_GREEN, XMAS_BLUE, XMAS_WHITE, as well as 
  10. # BRIGHT and FADE have already been assigned in XA.INI
  11.  
  12. GOTO start                      # Skip subroutines
  13.  
  14. #
  15. # Subroutine #1 
  16. #
  17.  
  18. :SUB1
  19. XMAS_GREEN BRIGHT    #   1) Fade up GREEN  (so GREEN and RED are BRIGHT)
  20. XMAS_RED FADE        #   2) Dim RED (so only GREEN is BRIGHT)
  21. XMAS_BLUE BRIGHT     #   3) Fade up BLUE  (so GREEN and BLUE are BRIGHT)
  22. XMAS_GREEN FADE      #   4) Dim GREEN (so only BLUE is BRIGHT)
  23. XMAS_WHITE BRIGHT    #   5) Fade up WHITE  (so BLUE and WHITE are BRIGHT)
  24. XMAS_BLUE FADE       #   6) Dim BLUE (so only WHITE is BRIGHT)
  25. XMAS_RED BRIGHT      #   7) Fade up RED  (so WHITE and RED are BRIGHT)        
  26. XMAS_WHITE FADE      #   8) Dim WHITE (so only RED is BRIGHT)
  27. RETURN                                                          
  28.  
  29.  
  30.  
  31.  
  32.  
  33. :start
  34.  
  35.  
  36. # Initialization - 
  37. # Let's start by turning all modules ON, Then fade all but RED
  38.  
  39. XMAS_RED ON
  40. XMAS_GREEN ON
  41. XMAS_BLUE ON
  42. XMAS_WHITE ON
  43.  
  44. XMAS_GREEN FADE
  45. XMAS_BLUE FADE
  46. XMAS_WHITE FADE
  47.  
  48. # This section is the main loop. All subroutines are called from here
  49.  
  50. :loop
  51.  
  52. GOSUB sub1      # Execute subroutine once...        
  53. GOSUB sub1      # Execute subroutine twice...
  54.  
  55. XMAS_GREEN BRIGHT    # Brighten everything
  56. XMAS_BLUE BRIGHT     #
  57. XMAS_WHITE BRIGHT    #
  58.  
  59. DELAY 0:0:5     # Wait 5 seconds
  60.  
  61. # Now DIM all but the RED
  62.  
  63. XMAS_GREEN BRIGHT
  64. XMAS_BLUE BRIGHT
  65. XMAS_WHITE BRIGHT
  66.  
  67. DISPLAY OFF
  68. # Now jump back to the ":outer" label and repeat this sequence all over again.
  69. # This sequence will continue forever until either:
  70. #       1) The <ESC> key is pressed (which will jump to the label ":EXIT"), 
  71. #       2) The condintional IF statement tests for the Current time being
  72. #          greater than 11:00 pm. Requires: Registered Version XA 2.x
  73. #          
  74.  
  75. DISPLAY ON
  76. IF (CTIME >= TIME 11:00 PM)
  77.   GOTO EXIT
  78. ENDIF
  79. GOTO loop
  80.  
  81. # The ":EXIT" label is searched for by the interpreter whenever the <ESC>
  82. # key is pressed. This allows the interpreter to execute a controlled shutdown.
  83.  
  84. :EXIT
  85.  
  86. XMAS_RED OFF
  87. XMAS_GREEN OFF
  88. XMAS_BLUE OFF
  89. XMAS_WHITE OFF
  90.